<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 伪类选择器 :first-child :last-child */
    div:first-child{
      background-color: red;
    }
    /* 选取页面div最后一个元素  */
    div:last-child{
      background-color: blue;
    }
    /* 选取页面某一个元素  nth-child(n) */
    div:nth-child(5){
      background-color: pink;
    }
    /* 选取页面中奇数标签 nth-child(odd) */
    div:nth-child(odd){
      color: orange;
      font-size: 25px;
    }
    /* 选取页面中偶数标签 nth-child(even) */
    div:nth-child(even){
      color: aqua;
    }
    /* 选取有规律标签 1 4 7 3n+1(n从0开始) */
    div:nth-child(3n+1){
      width: 100px;
      height: 100px;
    }
    /* 通配符选择器 普遍选择器 *表示选中所有 权重为0 */
    *{
      /* 设置下划线 取消下划线 */
      text-decoration:line-through;
    }
  </style>
</head>
<body>
  <div>我是div1</div>
  <div>我是div2</div>
  <div>我是div3</div>
  <div>我是div4</div>
  <div>我是div5</div>
  <div>我是div6</div>
  <div>我是div7</div>
  <div>我是div8</div>
</body>
</html>